import request from '@/utils/request'

// 获取考试题列表
export function getTestListAPI(params) {
  return request({
    url: '/exam/question',
    method: 'get',
    params
  })
}
// 获取学科名称列表
export function getSubjectNameAPI(params) {
  return request({
    url: '/subject/tree',
    method: 'get',
    params
  })
}
// 审核试题
export function checkStateAPI(data) {
  return request({
    url: '/exam/question/check',
    method: 'post',
    data
  })
}
// 删除试题
export function deleteTestAPI(id) {
  return request({
    url: '/exam/question/' + id,
    method: 'delete'
  })
}
// 上架 下架试题
export function groundingTestAPI(data) {
  return request({
    url: '/exam/question/show',
    method: 'post',
    data
  })
}
// 新增试题
export function addTestAPI(data) {
  return request({
    url: '/exam/question',
    method: 'post',
    data
  })
}
// 修改回显数据
export function showQuestionTestAPI(id) {
  return request({
    url: '/exam/question/' + id,
    method: 'get'
  })
}
// 修改提交数据
export function editQuestionTestAPI(data) {
  return request({
    url: '/exam/question/' + data.id,
    method: 'put',
    data
  })
}
// 批量上架 下架
export function upTestMoreAPI(data) {
  return request({
    url: '/exam/question/show',
    method: 'post',
    data
  })
}
// 批量通过
export function auditTestMoreAPI(data) {
  return request({
    url: '/exam/question/check',
    method: 'post',
    data
  })
}
